home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FCE Gold Plus
/
GOLD.iso
/
pc
/
fscommand
/
Xtras
/
FileXtra4_test.dir
/
00021_Script_FileOpen behavior
< prev
next >
Wrap
Text File
|
2002-12-20
|
906b
|
29 lines
on mouseUp me
fxObj = xtra("FileXtra4").new()
if not(objectP(fxObj)) then
WriteInfo("*** Could not instantiate FileXtra4. Is it in the Xtras folder? ***" & RETURN)
return
end if
volumeList = fxObj.fx_VolumesToList()
volumeToUse = volumeList.getAt(1)
if the platform contains "Mac" then
chosenFile = fxObj.fx_FileOpenDialog(volumeToUse, "TEXT/JPEG/PDF /W8BN") -- text/jpeg/PDF/word doc
else
end if
if chosenFile <> "" then
Alert "File path chosen is: " & chosenFile
Alert "I will now attempt to open the file..."
retVal = fxObj.fx_FileOpenDocument(chosenFile)
Alert "Return value from fx_FileOpenDocument is " & retVal & ", error number is " \
& fxObj.fx_ErrorNumber() & ", error string is '" & fxObj.fx_ErrorString() & "'."
else
alert "Open dialog cancelled."
end if
fxObj = 0
end